package org.zero.onlinesubject.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.zero.onlinesubject.common.vo.HomeworkVo;
import org.zero.onlinesubject.entity.Homework;

import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 *
 */
public interface HomeworkService extends IService<Homework> {

    HomeworkVo getHomeworkVo(Integer homeworkId) throws ExecutionException, InterruptedException, TimeoutException;

    Boolean deleteHomework(Integer homeworkId);

    Boolean updateHomework(HomeworkVo homeworkVo);

    Boolean createHomework(HomeworkVo homeworkVo) throws ExecutionException, InterruptedException, TimeoutException;

    List<Homework> getHomeworkList(String userId, Integer current, Integer size);

    List<Homework> getPubList(String userId, Integer current, Integer size);

    List<HomeworkVo> getApprovalList(String classId, String courseId, String approval, Integer current, Integer size);

    Double calcScore(HomeworkVo homeworkVo);
}
